import 'package:flutter/material.dart';

class TestFractionallySizedBox extends StatefulWidget {
  @override
  _TestFractionallySizedBoxState createState() => _TestFractionallySizedBoxState();
}

class _TestFractionallySizedBoxState extends State<TestFractionallySizedBox> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('FractionallySizedBox'),
      ),
      body: Center(
        child: Column(children: [
          Container(
            width: 100,
            height: 100,
            color: Colors.blue,
            // padding: EdgeInsets.all(10),
            child:FractionallySizedBox(
              widthFactor: 0.5,
              heightFactor: 2,
              child:  Container(
                color: Colors.red,
              ),
            ),)
        ],),
      ),
    );
  }
}